package com.kamistoat.meimeimall.meimeimallmember.web;

import com.kamistoat.meimeimall.common.annotation.DubboAndHTTPExceptionCatch;
import com.kamistoat.meimeimall.common.annotation.LoginRequired;
import com.kamistoat.meimeimall.common.utils.R;
import com.kamistoat.meimeimall.meimeimallmember.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户管理页面")
@RestController
@RequestMapping("web")
public class MemberManagePageController {
    protected Logger logger = LoggerFactory.getLogger(MemberManagePageController.class);

    @Autowired
    MemberService memberService;

    @ApiOperation("生成测试用户数据")
    @GetMapping("/construct_test_member_data")
    // @LoginRequired
    @DubboAndHTTPExceptionCatch
    public R constructTestMemberData(@RequestParam("memberNum") Integer memberNum) {
        memberService.constructTestMemberData(memberNum);
        return R.ok();
    }

}
